package kr.hkit.androidcomplete02.fragment;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class CheckList extends Activity implements CheckDialogFragment.NoticeDialogListener {
	TextView tv;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialogex);
		
		tv = (TextView) findViewById(R.id.dialog_tv);
	}
	
	public void mOnClick(View v){
		DialogFragment newFragment = new CheckDialogFragment();
		Bundle bundle = new Bundle();
		newFragment.setArguments(bundle);
		newFragment.show(getFragmentManager(), "Dialog");
	}
	
	@Override
	public void onDialogClick(DialogFragment dialog, String res) {
		tv.setText(res);
		Toast.makeText(this, res, Toast.LENGTH_LONG).show();
	}

}
